package com.mmall.util;

import org.apache.commons.lang3.StringUtils;

/**
 * @Author wangtengyu
 * @Create 2018-03-07-10:17
 */
public class LevelUtil {
    public final static String SEPARATOR=".";

    public final static String ROOT="0";

    public static String getLevel(String parentLevel,int parentId){
        if(StringUtils.isBlank(parentLevel)){
            return ROOT;
        }else {
            return StringUtils.join(parentLevel,SEPARATOR,parentId);
        }
    }
}
